package com.hyts.dbmeta.handler.mysql;

import com.hyts.dbmeta.base.AbstractConnectionConfig;
import com.hyts.dbmeta.config.DbDriverClassConfig;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.dbmeta.handler.mysql
 * author:Libo/Alex
 * create-date:2019-06-17 20:14
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于: 高版本mysql数据库驱动连接
 */
public class MysqlNewConnectionHandler extends MySqlConnectionHandler {

    /**
     * @param connectionConfig
     */
    public MysqlNewConnectionHandler(AbstractConnectionConfig connectionConfig) {
        super(connectionConfig);
    }

    /**
     * 注入相关的数据库-driver驱动类
     * @return
     */
    @Override
    protected boolean injectClassLoader() {
        try {
            Class.forName(DbDriverClassConfig.MYSQL_V8_DRIVER_CLASS);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }

}
